#include "stdafx.h"
#include "WinMain.h"


int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
	#if defined(DEBUG) | defined(_DEBUG)
		_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
	#endif
	srand(static_cast<unsigned int>(time(NULL)));
	rand(); rand(); rand(); rand();

	g_pSystem_Main = SmartPtr<MainSystem>(new MainSystem);
	g_pSystem_Main->Initialize();
	g_pSystem_Main->HGESYSTEM()->System_Start();
	g_pSystem_Main->ShutDown();
	g_pSystem_Main.reset(NULL);
	g_pSystem_Main.release();
	return 0;
}